
#include <QDebug>
#include "qdock.h"
#include <QIcon>
#include "dockwidget.h"
#include "defaultwindowfinder.h"
#include <QLayout>
#include <QSplitter>
#include "imitatorwidget.h"
#include "indicators.h"
#include "splitter.h"
#include "containers.h"
#include "basedock.h"


QPreviewWidget::QPreviewWidget(QWidget *parent, Qt::WindowFlags f)
    : QWidget(parent,f) {
    setFocusPolicy(Qt::StrongFocus);
}

void QPreviewWidget::keyPressEvent(QKeyEvent *evt) {
    emit keyPress(evt);
    return QWidget::keyPressEvent(evt);
}



QDockItem *QDockItem::parentDockItem()
{
    QWidget* parent = this->parentWidget();
    while (parent && qobject_cast<QDockItem*>(parent) == 0){
        parent = parent->parentWidget();
    }
    if (parent){
        return qobject_cast<QDockItem*>(parent);
    }
    return 0;
}






